package com.ruoyi.mapper;

import com.ruoyi.domain.BaseEqtypeInfo;
import com.ruoyi.domain.BasisEquipmentInformationv;
import com.ruoyi.domain.ReturnDate;
import com.ruoyi.dto.BasisPositionEquipment;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 装备信息Mapper接口
 * 
 * @author ruoyi
 * @date 2025-05-24
 */
public interface BasisEquipmentInformationvMapper 
{
    /**
     * 查询装备信息
     * 
     * @param id 装备信息主键
     * @return 装备信息
     */
    public BasisEquipmentInformationv selectBasisEquipmentInformationvById(Long id);

    /**
     * 查询装备信息列表
     * 
     * @param basisEquipmentInformationv 装备信息
     * @return 装备信息集合
     */
    public List<BasisEquipmentInformationv> selectBasisEquipmentInformationvList(BasisEquipmentInformationv basisEquipmentInformationv);

    /**
     * 新增装备信息
     * 
     * @param basisEquipmentInformationv 装备信息
     * @return 结果
     */
    public int insertBasisEquipmentInformationv(BasisEquipmentInformationv basisEquipmentInformationv);

    /**
     * 修改装备信息
     * 
     * @param basisEquipmentInformationv 装备信息
     * @return 结果
     */
    public int updateBasisEquipmentInformationv(BasisEquipmentInformationv basisEquipmentInformationv);

    /**
     * 删除装备信息
     * 
     * @param id 装备信息主键
     * @return 结果
     */
    public int deleteBasisEquipmentInformationvById(Long id);

    /**
     * 批量删除装备信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBasisEquipmentInformationvByIds(Long[] ids);


    public List<ReturnDate> queryType (Long id);

    public List<BasisEquipmentInformationv> findByEquipmentTypeEquipmentModel (@Param("equipmentType") String equipmentType, @Param("equipmentModel")String equipmentModel,@Param("loadingId")String loadingId,@Param("positionId")Integer positionId);


    public List<BasisEquipmentInformationv> findByPositionIdType(@Param("positionId") Integer positionId, @Param("loadingId") String loadingId);

    public List<BasisEquipmentInformationv> findByPositionIdTypeXueyuan(@Param("positionId") Integer positionId, @Param("loadingId") String loadingId,@Param("userId") String userId);

    public boolean addBasisPositionEquipment(BasisPositionEquipment basisPositionEquipment);

    //删除阵地关联的设备
    boolean delBasisPositionEquipmentInformationv(@Param("loadingId") String loadingId,@Param("positionId") Integer positionId);

    boolean delBasisPositionEquipmentInformationvEqid(@Param("loadingId") String loadingId,@Param("positionId") Integer positionId,@Param("eqId") Integer eqId);

    //根据案例阵地人员id查询 人员下的设备
     public List<BasisEquipmentInformationv> findbyloadingIdpositionIduserId(@Param("loadingId") String loadingId,@Param("positionId") Integer positionId,@Param("userId") Integer userId);



    public Integer selectLoadingIdAndEqId(@Param("loadingId") String loadingId,@Param("eqId") Integer eqId);

}
